The present invention relates generally to systems and methods for generating an image for viewing on a computer display.
In many computer systems, it is common to represent and convey information to a user through digital images. These images may take a variety of forms such as alphanumeric characters and graphs and other pictorial representations. The digital images are conveyed to users on graphical rendering devices, such as video monitors, printers and the like. Typically, the digital images are stored in digital form, manipulated and then displayed on a monitor or printed on an output device such as a printer.
Typically, a computer""s printer can provide resolution that is significantly higher than the resolution provided by its display screen. For example, a standard VGA display screen provides 96 dots-per-inch (dpi) resolution, whereas a conventional laser printer provides 600 dpi resolution, and professional-quality printers can provide still higher resolution, for example, 1200 dpi, 2400 dpi or more.
In addition to having lower resolution than printer resolution, display screens also vary in size. For instance, a conventional desktop screen may have up to 2Kxc3x972K display resolution, while the screens of hand held computers may be limited to a resolution of 160xc3x97160. This low resolution is due to the small size of these devices.
The use of a small display requires the use of small font characters or abbreviations in order to present visual information to the user of the device. This makes the displayed data difficult to read or interpret. However, increasing readability by increasing the display size conflicts with the desire for portability in hand held computers.
Additionally, a new trend in user interface provides immersive 3D environments in which the viewer is given the impression of being brought into and navigating within a 3D environment. One recent use of immersive 3D graphics is virtual reality (VR), which attempts to give the viewer the impression of being inside a 3D representation of a real or imaginary place. However, a viewer of a VR system may experience xe2x80x9ctunnel vision,xe2x80x9d in which the video monitor appears to be window placed several feet from the viewer through which he or she views objects and places on the other side of the window. This limits the viewer""s field to a few degrees, eliminating most of the normal field of vision. To overcome tunnel vision, a display with a wide field of view is used. In these environments, even though the VR display may have high resolution, characters are typically displayed poorly in the wide field of view.
Due to the wide range in size and resolution of display devices, the display of text or graphics may vary from the screen of one platform to another. Further, discrepancies exist between the appearance of the screen and the appearance of a printer""s hardcopy. These discrepancies can confuse and frustrate the user.
In general, to display text on a pixel-oriented display device, a computer system utilizes one or more fonts. A font is a collection of characters designed by a typographer in a consistent style. Specifically, a typographer designs an outline for each glyph of the font, including characters, numbers, punctuation, and any other images for the font.
A problem develops when characters such as the Roman letters xe2x80x9cAxe2x80x9d, xe2x80x9cBxe2x80x9d, or xe2x80x9cCxe2x80x9d, or other glyphs having slanted and/or curved portions, are to be rendered in typeface quality on a resolution-limited display device. The slanted and/or curved edge portions of the images cannot be rendered in ideal form if the resolution of the bit-mapped rendering apparatus or the resolution of a corresponding, bit-mapped display media is below a very high value (e.g., below 300 dots per inch).
In traditional computer font rendering, each pixel is either xe2x80x9con,xe2x80x9d appearing as a tiny individual black square, or xe2x80x9coff.xe2x80x9d Some letters appear jagged on the computer screen because they are formed from many of these tiny squares. The finite resolution of many display devices can give the rendition of the slanted and/or curved portions of glyphs such as xe2x80x9cAxe2x80x9d, xe2x80x9cBxe2x80x9d, xe2x80x9cCxe2x80x9d, a jagged appearance instead of a desired smooth appearance.
Various techniques have been developed to attempt to address the problems engendered by resolution differences. One approach called hinting is described in U.S. Pat. No. 5,796,409 where grey scale characters are generated using a hinted character outline description whose hints include control information indicating the points which define the location of bars, of serifs, of curved character parts and of other character elements such as terminals. Hints may also be used to describe which portions of the characters should be displaced and stretched in order to modify the width and the position (phase) of the different character elements relative to the pixel grid. At rendering time, contrast control is obtained by applying grey scalexe2x80x94specific modifications to the character outline, using the hinting information. This set of modifications includes the displacement of horizontal and vertical bar boundaries, with one boundary of each bar placed on a pixel boundary, thereby producing one high-contrast single edge. It also includes possible enlargement of bars and curved stems in order to respect a minimal width and to ensure that all important character parts, even at small sizes, have a sufficiently strong appearance. It further includes the phase placement of curved stems on the grid, in order to produce similar grey intensity profiles throughout similar curved stems.
In hinting, characteristics of the original font design are identified and the outline of the character is adjusted to insure that important characteristics will be preserved when the character outline is rendered in different sizes on different devices. Common hinting goals include consistent stem weights, consistent intensity, even spacing, and the elimination of pixel dropouts. However, at small sizes, the characters tend to loose their shape and readability, since key parts of a character""s shape are lost as the character is fitted onto a reduced number of pixels.
Another technique for improving the quality of small image display is generally referred to as xe2x80x9canti-aliasingxe2x80x9d. One form of anti-aliasing, which is referred to here as xe2x80x9cgrey scalingxe2x80x9d, modulates the intensity or grey scale value of certain individual pixels that are partially overlapped by the image when such pixels are found at and/or near slanted/curved edges of an image. The intensity modulation gives such edges a smooth appearance. However, this technique causes the character to take on a fuzzy appearance on the screen.
In one aspect, the invention relates to systems and methods for rendering a graphical object for display on a destination raster of pixels having a destination resolution. The graphical object is displayed by rendering the graphical object at a resolution higher than the destination resolution to generate one or more pieces, the pieces in the aggregate representing the graphical object at the higher resolution, and each of the pieces having a position with respect to the destination raster, whereby each piece overlaps one or more pixels. Next, for each of the pieces, the invention calculates a contribution made by the piece to each of one or more pixels according to a selected algorithm, the algorithm being selected by a process applying a plurality of factors; and aggregates all the contributions made to each pixel to determine a value for the pixel.
Implementations of the invention include one or more of the following. The plurality of factors includes the positional relationship of the piece to the raster grid. The plurality of factors also include a factor selected from a group consisting of the positional relationship of the piece to an object bounding box, the positional relationship of the piece to a glyph x-height, the positional relationship of the piece to a glyph cap-height, the relationship of the size of the piece to a font stem width, the presence of a pixel in a row or column associated with a high horizontal or vertical density of the graphical object, the position of the piece relative to a boundary of an adjacent object, and the number of pixels of the destination grid overlapped by the piece. The graphical object can be a glyph. The rendering can be done at a high resolution to generate pieces so that any pair of pieces that are adjacent in a first direction have at least a minimum distance between them. The first direction can be a vertical direction or a horizontal direction. Each piece can be a run with a start position and a stop position. The piece""s contribution to a pixel can a linear function of the amount of the pixel that the piece overlaps if the piece overlaps four or more pixels. If the piece overlaps three or fewer pixels, a calculation that makes adjustments to the contribution according to one or more factors can be done. One of the factors includes whether the piece falls within one pixel. Other factors include whether the piece straddles two pixels, three pixels, or more than three pixels. The graphical object can be a glyph from a font having a stem width and wherein one of the factors includes whether the piece is has a substantial width relative to the stem width. The width can be treated as being substantial if it is at least 75% of the stem width. The contribution to a pixel can be enhanced if the pixel is in a destination raster row or column having a vertical or horizontal density histogram region that is higher than average. The vertical or horizontal density histogram can be calculated from the higher resolution rendering of the graphical object and a histogram region can be deemed higher than average at points where the height is at least twice the average histogram height. For a graphical object with a large vertical component, the invention can determine from the histogram whether a piece overlaps the large vertical component of the graphical object. The invention can eliminate one or more pieces to enhance the separation of two graphical objects. In one implementation, the one or more pieces can be eliminated to enhance a vertical separation of two graphical objects. The invention can also move, delete and add new pieces to an array of pieces. The invention can sharpen the image in the destination raster of pixels. The sharpening step can set the pixel value to a maximum value if the pixel value exceeds a predetermined maximum threshold, or set the value of a pixel to a minimum value if the pixel value is less than a predetermined minimum threshold. In one embodiment, at least one pixel receives contributions calculated according to two or more distinct algorithms.
Advantages of the invention include one or more of the following. The invention retains features most important for readability of graphical objects when they are fitted onto a reduced number of pixels. Readability relates to the ease with which a reader can comprehend the meaning of the words on the page of a document.
Moreover, the graphical objects retain their sharp edges and contrast while minimizing potential distortions to the glyph""s shape. The invention is also computationally efficient since it reduces the processing of a new color when compositing the graphical objects onto the background. The color of text on a page is preserved, which is important in color-managed systems.
The invention presents the user with more or less realistic displays portraying how a paragraph, page, document, or other text being processed will appear when displayed on a small display device such as a small LCD display of a Personal Digital Assistant (xe2x80x9cPDAxe2x80x9d), a low resolution printer, or a VR display such as a VR headset. The text being constructed on the screen is shown as accurately as possible as compared with a final printout. Thus, the invention supports What You See Is What You Get (WYSIWYG) functionality even on resolution-limited display devices.
Other features and advantages of the invention will be apparent from the following description, including the drawings, and from the claims.